<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>元素屏幕居中</title>
<style>
	*{ margin:0; padding:0; }
	body{ height:2000px; text-align:center; }
	.main{ position:relative; top:10px; }
</style>
</head>
<body>
<span class="main">这是文本内容</span>
</body>
</html>
